package com.atguigu.gmall.pms;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

//http://localhost:18081/swagger-ui.html

@SpringBootApplication
@EnableDiscoveryClient //启动nacos客户端功能，主动将自己注册到注册中心，加不加都可以
@EnableSwagger2 //启动swagger2功能
@MapperScan(basePackages = "com.atguigu.gmall.*.mapper")//DAO层的Mpper接口这个是没有@Respository这个注解的，所以我们用@MapperScan包扫描，将它纳入spring的管理，精确指定了哪个是Mapper接口，即spring集成myBaits，医疗项目把该注解放在了配置类上面
@EnableFeignClients //启用feignClient的扫描创建功能，即启用openFeign
@EnableTransactionManagement//启用声明式事务,医疗项目把它放在了配置类上面
public class GmallPmsApplication {

    public static void main(String[] args) {
        SpringApplication.run(GmallPmsApplication.class, args);
    }

}
